﻿<UserControl x:Class="BillsManager.Views.StatusBarView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:ViewModels="clr-namespace:BillsManager.ViewModels;assembly=BillsManager.ViewModels"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:Loc="clr-namespace:BillsManager.Localization;assembly=BillsManager.Localization"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             d:DataContext="{d:DesignInstance Type=ViewModels:StatusBarViewModel,
                                              IsDesignTimeCreatable=True}"
             d:DesignHeight="30"
             d:DesignWidth="600"
             mc:Ignorable="d">

    <UserControl.Resources>
        <!--<ResourceDictionary Source="Dictionaries\Styles.xaml" />-->
        <ResourceDictionary Source="Themes\Themes.xaml" />
    </UserControl.Resources>

    <StatusBar FontSize="{StaticResource View.FontSize}" Foreground="{StaticResource StatusBar.Foreground}">

        <TextBlock Text="{Binding ConnectionStateString}" />

        <TextBlock Visibility="{Binding IsConnected, Converter={StaticResource BooleanToVisibilityConverter}}">
            <Run Text="{Binding SuppliersCount}" />
            <Run Text="{Loc:Translate Suppliers}" />
        </TextBlock>

        <TextBlock Visibility="{Binding IsConnected, Converter={StaticResource BooleanToVisibilityConverter}}">
            <Run Text="{Binding BillsCount}" />
            <Run Text="{Loc:Translate Bills}" />
        </TextBlock>

    </StatusBar>

</UserControl>